﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace System
{
    /// <summary>
    /// 表示事件消息
    /// </summary>
    /// <typeparam name="TEventType">事件类型</typeparam>
    /// <typeparam name="TEventData">事件数据</typeparam>
    public class EventMessage<TEventType, TEventData>
    {
        /// <summary>
        /// 事件类型
        /// </summary>
        public TEventType EventType { get; }
        /// <summary>
        /// 事件数据
        /// </summary>
        public TEventData EventData { get; }

        /// <inheritdoc cref="EventMessage{TEventType, TEventData}"/>
        /// <param name="eventType"><inheritdoc cref="EventType" path="/summary"/></param>
        /// <param name="eventData"><inheritdoc cref="EventData" path="/summary"/></param>
        public EventMessage(TEventType eventType, TEventData eventData)
        {
            EventType = eventType;
            EventData = eventData;
        }
    }
}
